package com.school.information.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.school.information.core.security.entity.BaseEntity;
import com.school.information.enums.status.EnabledEnum;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("sys_role")
public class SysRoleEntity extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 角色名称
     */
    @NotBlank(message = "角色名称不能为空")
    @Length(max = 30, message = "角色名称最大长度为30个字符")
    private String name;

    /**
     * 角色编码
     */
    @NotBlank(message = "角色编码不能为空")
    @Length(max = 20, message = "角色编码最大长度为20个字符")
    private String code;

    /**
     * 是否启用 0启用 1禁用
     */
    private EnabledEnum isEnabled;

    /**
     * 备注
     */
    private String remark;
}
